﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ass5Vinyl.VIEW
{
    public partial class EmployeeInsertion : Form 
    {

        CONTROLLER.EmployeesManaging em;
        public EmployeeInsertion()
        {
            InitializeComponent();
            em = new CONTROLLER.EmployeesManaging();
        }

        private void b_insertion_Click(object sender, EventArgs e)
        {
            CONTROLLER.Employee employee = new CONTROLLER.Employee() ;
            employee.eId = Convert.ToInt32(tb_Eid.Text);
            employee.eName = tb_Ename.Text;
            employee.eAdderess = tb_Eaddress.Text;
            employee.ePhone = tb_Ephone.Text;
            employee.eSalary = tb_Esalary.Text;
            string ans = em.InsertEmployee(employee);
            System.Windows.Forms.MessageBox.Show(ans);
        }

        
    }
}
